package cn.com.callback;
import groovy.json.*;
import groovy.swing.impl.DefaultAction;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
import cn.com.elite.EliteBean;
import java.security.MessageDigest;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.wisdge.dataservice.Result;
import java.util.Map;
import java.util.Date;
import java.util.HashMap;

import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;

import cn.com.elite.Util;
import cn.com.kh.getProperty;
import cn.com.kh.KHUtil;

/**
 *
 * @Title: HST_JOB_SftpFile
 * @Description: 企业微信同步 job
 * @author: Chieh
 * @date 2021-07-28 11:43:00
 *
 */

public class HST_JOB_SftpFile implements CallBackInvoke{
	private static final Log log=LogFactory.getLog(HST_JOB_SftpFile.class);
	
	public void doCallBack(EliteBean eliteBean,String callBack,Map map,String body) {

		log.debug("-------------------------start HST_JOB_SftpFile 开始调用-----------------");
		Map<String, String> headMap = new HashMap<String, String>();
		headMap.put("Content-Type", "application/json");
		//获取配置参数
		String sysurl = getProperty.get("crmurl");//配置本地接口地址
		String urldz1 ="";
		String urldz2 ="";
		String urldz3 ="";
		String urldz4 ="";
		String urldz5 ="";
		String urldz6 ="";
		
		//可手动入参调度  {"hsttype":"1001","datetime":"20210801"}
		//华盛 企业微信读取（SFTP） 操作记录回传--内部接口
		urldz1 = sysurl+"HST_API_SftpFile";
		Util.doHttpPostUseHead(urldz1,"{}","UTF-8",100000,0,headMap);

		// 华盛 企业微信读取（SFTP） 敏感词数据回传--内部接口
		urldz2 = sysurl+"HST_API_SftpFile_Sensitive";
		Util.doHttpPostUseHead(urldz2,"{}","UTF-8",100000,0,headMap);

		// 华盛 企业微信读取（SFTP） 会话存档消息回传--内部接口
		urldz3 = sysurl+"HST_API_SftpFile_Chat_Msg";
		Util.doHttpPostUseHead(urldz3,"{}","UTF-8",100000,0,headMap);

		//华盛 企业微信读取（SFTP） 客户标签同步（增量）--内部接口
		urldz4 = sysurl+"HST_API_SftpFile_Client_Tag";
		Util.doHttpPostUseHead(urldz4,"{}","UTF-8",100000,0,headMap);
		

		//华盛 知识库排行榜更新--内部接口
		urldz5 = sysurl+"apiHST_KM_ranking";
		Util.doHttpPostUseHead(urldz5,"{}","UTF-8",100000,0,headMap);
		
		//华盛 历史数据归档--内部接口
		urldz6 = sysurl+"apiHST_Data_archiving";
		Util.doHttpPostUseHead(urldz6,"{}","UTF-8",100000,0,headMap);
	}
}